<{include file="tpl/header.html"}>
<h2 class="ytadmin-h2">编辑管理</h2>
<div class="ytadmin-form-wrap clearfix">
	<form class="form-inline pull-right" action="<{spUrl c=setting a=user}>" method="post">
	<div class="form-group">
	    	<label class="sr-only" for="name">用户名：</label>
	    	<input type="text" name="name" id="name" class="form-control" value="<{$user_add_return['name']}>" placeholder="用户名"/>	
	</div>
	<div class="form-group">
	    	<label class="sr-only" for="password">密码：</label>
		    <input type="password" name="password" id="password" class="form-control"  value="" placeholder="密码"/>	
	</div>
	<div class="form-group">
		<input type="submit" class="btn btn-info" name="user_add_submit" value="添加"/>	
	</div>
	</form>
</div>
<div class="ytadmin-table-wrap">
	<table class="table table-striped">
		<tr>
			<th>用户名</th>
			<th>密码</th>
			<th>登陆次数</th>
			<th>操作</th>
		</tr>
		<{foreach item=user_item from=$user_result}>
		<tr>
		<form action="<{spUrl c=setting a=user}>" method="post">
			<input type="hidden" name="id" value="<{$user_return['id']|default:$user_item['id']}>"/>
			<td>
				<input type="text" name="name" value="<{$user_return['name']|default:$user_item['name']}>"/>	
			</td>

			<td>
				<input type="password" name="password" />	
			</td>
			<td>
				<{$user_item['login_time']}>	
			</td>
			<td>
				<input type="submit" name="user_update_submit" value="更新"/>	
			
				<input type="submit" name="user_delete_submit" class="delete_alert" value="删除"/>	
			</td>
		</form>
		</tr>
		<{/foreach}>
	</table>
</div>
<h2 class="ytadmin-h2">修改管理员信息</h2>
<div class="ytadmin-form-wrap clearfix">
<form class="form-horizontal"action="<{spUrl c=setting a=user}>" method="post">
	<div class="form-group">
		<label class="col-sm-2 control-label" for="name1">原用户名：</label>
		<div class="col-sm-10">
			<input type="text" class="form-control" id="name1" name="name1" />
		</div>	
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label" for="password1">原密码：</label>
		<div class="col-sm-10">
			<input type="password" class="form-control"  id="password1" name="password1" />	
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label" for="name2">新用户名：</label>
		<div class="col-sm-10">
			<input type="text" class="form-control" id="name2" name="name2" />
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label" for="password2">新密码：</label>
		<div class="col-sm-10">
			<input type="password" class="form-control" id="password2" name="password2" />	
		</div>
	</div>
	<div class="form-group">
		<div class="col-sm-offset-2 col-sm-10">
			<input type="submit" class="btn btn-info" name="admin_update_submit" value="更新"/>
		</div>
	</div>
</form>
</div>
<{include file="tpl/footer.html"}>